Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add compare module, move Grid/Scenario check functions from PostREISE to PowerSimData #507

Merged
merged 6 commits into from
Jun 25, 2021

Conversation

danielolsen
Copy link
Contributor

Pull Request doc

Purpose

  • Add a new module, powersimdata.design.compare, to consolidate code which compares Grid data tables.
  • In the process of moving code from PostREISE to PowerSimData, move associated check functions which do not depend on PCM outputs.

What the code is doing

  • powersimdata.design.compare gets comparison logic that had been performed elsewhere in PowerSimData or PostREISE.
  • powersimdata.design.investment uses the newly consolidated comparison logic.
  • powersimdata.input.check and powersimdata.scenario.check get the Grid and Scenario check functions (with associated tests).

Testing

Existing unit tests still pass. The existing comparison logic in PowerSimData was untested, but now has a path to getting tests, since it is separated from the broader investment cost calculations.

Where to look

The only real new code is in powersimdata.design.compare.generation, since it is more robust than what we had before in calculate_gen_inv_costs. Everything else is just moved from elsewhere, with references updated.

Time estimate

15-30 minutes.

@danielolsen danielolsen force-pushed the daniel/compare_module branch 2 times, most recently from 04b0640 to a808ad6 Compare June 24, 2021 17:47
Copy link
Collaborator

@BainanXia BainanXia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice. Thanks.

@danielolsen
Copy link
Contributor Author

Per discussion at Breakthrough-Energy/PostREISE#310, we probably also want to move postreise.analyze.helpers into powersimdata.input.helpers. Do we want to do this in this PR, or a follow-up?

@rouille
Copy link
Collaborator

rouille commented Jun 24, 2021

Per discussion at Breakthrough-Energy/PostREISE#310, we probably also want to move postreise.analyze.helpers into powersimdata.input.helpers. Do we want to do this in this PR, or a follow-up?

Your call

@danielolsen danielolsen force-pushed the daniel/compare_module branch from a808ad6 to c744006 Compare June 25, 2021 15:48
@danielolsen danielolsen force-pushed the daniel/compare_module branch from c744006 to b46cae3 Compare June 25, 2021 15:51
@danielolsen danielolsen merged commit 2fe6f7f into develop Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code that is being refactored
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants